package tech.eyao.hs60x.dao;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import tech.eyao.hs60x.mapper.AppVersionDOMapper;
import tech.eyao.hs60x.model.domain.AppVersionDO;

/**
 * 类AppVersionDao.java的实现描述：TODO 类实现描述
 * 
 * @author fengjianchao 2018年1月31日 下午5:16:53
 */
@Repository
public class AppVersionDao {
    @Autowired
    private AppVersionDOMapper appVersionDOMapper;

    /**
     * @param appVersionDO
     * @return
     */
    public boolean addAppVersion(AppVersionDO appVersionDO) {
        appVersionDO.setGmtCreated(new Date());
        appVersionDO.setGmtModified(new Date());
        return appVersionDOMapper.insert(appVersionDO) > 1;
    }

    /**
     * @return
     */
    public List<AppVersionDO> queryAppVersionByAppId(String appId) {
        return appVersionDOMapper.queryAppVersionByAppId(appId);
    }
}
